// combineReducers 对reduces里的文件进行整合
import { combineReducers } from 'redux'
import { connectRouter  } from 'connected-react-router'
import registerReducer from './register'
import productsReducer from './products'
import searchReducer from './search'
import filterReducer from './filter'
import productDetailReducer from './productDetail'

const createRootReducer = history => combineReducers ({
	// 存储了相关的路由信息
	router: connectRouter(history),
	register: registerReducer,
	products: productsReducer,
	search: searchReducer,
	filter: filterReducer,
	productDetail: productDetailReducer
})

export default createRootReducer